import request from '@/router/axios'

export function fetchPvmDeviceList(query) {
  return request({
    url: '/pvm/pvmdevice/page',
    method: 'get',
    params: query
  })
}

export function addPvmDeviceObj(obj) {
  return request({
    url: '/pvm/pvmdevice',
    method: 'post',
    data: obj
  })
}

export function getPvmDeviceObj(id) {
  return request({
    url: '/pvm/pvmdevice/' + id,
    method: 'get'
  })
}

export function delPvmDeviceObj(id) {
  return request({
    url: '/pvm/pvmdevice/' + id,
    method: 'delete'
  })
}

export function putPvmDeviceObj(obj) {
  return request({
    url: '/pvm/pvmdevice',
    method: 'put',
    data: obj
  })
}

export function getList(type,obj){
  return request({
    url: '/pvm/pvmdevice/'+type,
    method: 'post',
    data: obj
  })
}

export function getDevice(obj){
  return request({
    url: '/pvm/pvmdevice/getDeviceId',
    method: 'post',
    data: obj
  })
}
